home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
doors_2
/
stckdoor.zip
/
STOCK_IN.PRG
< prev
next >
Wrap
Text File
|
1992-08-03
|
2KB
|
86 lines
* STOCK_IN.PRG
* This routine pulls information from the file STOCK.LOG. You will need to
* modify it to fit your LOG file depending on where you get your STOCK quotes
* If you download the file DAILY.ZIP and unzip it to DAILY.DBF on a daily basis
* you will not need to use this routine at all. DAILY.ZIP is about 75K and is
* available on the Corporate Network
*
* Since I have no idea what your Stock Quote log file looks like I could only
* provide the routine that I use.
*
* Registration of the Stock Door is $10 per year, or $25 per year with the
* data file download option.
*
* You may use the download feature and the software free for 2 Months just
* register on the Corporate Network (908)940-1045 leave a message for the SYSOP.
*
*═══════════════════════════════════════════════════════════════════════════════
* Print the time to gate an idea of how long this takes
? time()
* field to flag a bad log file
badfile = .f.
set safety off
set talk off
* Daily.DBF - daily stock quotes
use daily
* Make Backup Copy
copy to olddaily
zap
? "Appending from Stock.log"
append from stock.log sdf
go bottom
if recno() <= 50
badfile = .t.
? "Bad log file -- Too short "
else
go top
do while recno() < 200
if (high = 'RARILY')
Badfile = .t.
? "Badfile"
endif
skip
enddo
endif
if badfile
use olddaily
copy to daily
use daily index code
pack
quit
endif
? "Delete Phase I"
delete all for code = 'STOCK' .or. code = 'ENTER' .or. code = 'TRADE'
? "Delete Phase II"
delete all for code = ' '
? "Create Invalid"
copy to invalid for open = 'VALID'
? "Delete Phase III"
delete all for open = 'VALID'
go top
n = 0
set alternate to stock.txt
set alternate on
? "┌──────────────────────────────────────────────────────────────────────┐"
do While n= 0
if code = 'DOW JON' .or. code = 'TRANS' .or. substr(code,3,1) = '-'
? "│"+CODE+CLOSE+OPEN+HIGH+LOW+LAST+VOL+"│"
endif
if code = 'TRANS'
n = 1
endif
skip
enddo
? "└──────────────────────────────────────────────────────────────────────┘"
set alternate off
set alternate to
? "Delete Phase IV"
delete all for code = 'DOW JON' .or. code = 'TRANS' .or. (substr(code,3,1)='-' .and. substr(code,7,1)='-')
? "Pack Data"
pack
set index to code
reindex
? Time()
quit